import 'package:flutter/material.dart';
import 'package:library_base/ext/theme_data_ext.dart';
import 'package:library_base/global/multi_language.dart';
import 'package:library_base/res/decoration.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:library_base/res/edge.dart';
import 'package:library_base/res/gaps.dart';
import 'package:library_base/utils/theme_util.dart';
import 'package:library_base/widget/button/gradient_button.dart';
import 'package:get/get.dart';


Widget buildBottom({
  void Function()? distribute,
}) {
  return Container(
    decoration: rectTop,
    child: Column(
      children: [
        gapH21,
        Container(
            padding: edgeLR24,
            height: 166.w,
            alignment: Alignment.topRight,
            child: Row(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Expanded(
                  child: GradientButton(
                    ThemeUtil.getTheme(),
                    radius: const BorderRadius.only(
                        topLeft: Radius.circular(50), bottomLeft: Radius.circular(50)),
                    colors: ThemeUtil.getTheme().buttonLeft1BgColor(),
                    height: 80.w,
                    text: MultiLanguage.cancel.tr,
                    onPressed: () {
                      Get.back();
                    },
                  ),
                ),
                Expanded(
                  child: GradientButton(
                    ThemeUtil.getTheme(),
                    radius: const BorderRadius.only(
                        topRight: Radius.circular(50), bottomRight: Radius.circular(50)),
                    height: 80.w,
                    colors: ThemeUtil.getTheme().buttonRight1BgColor(),
                    text: MultiLanguage.determine.tr,
                    onPressed: () {
                      distribute?.call();
                    },
                  ),
                ),
              ],
            )),
      ],
    ),
  );
}